package com.cddx.logistics.mapper;

import com.cddx.logistics.domain.dto.MaterialQueryDTO;
import com.cddx.logistics.domain.pojo.Material;
import com.cddx.logistics.domain.vo.MaterialInfoVO;
import com.cddx.logistics.domain.vo.MaterialVO;
import com.cddx.logistics.util.model.R;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MaterialMapper {
    List<MaterialVO> queryPage(MaterialQueryDTO queryDTO);
    int add(Material material);
    int update(Material material);
    int delete(Long id);

    int deleteBatch(@Param("ids") String[] ids);
    MaterialInfoVO getMaterialInfo(@Param("materialId") Long materialId);

    List<MaterialVO> getMaterialByInventory(@Param("storageLocationId") Long storageLocationId);
}